package cn.tsmchina.one.service.rcatagory;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.tsmchina.one.dao.rcatagory.RcatagoryDao;
import cn.tsmchina.one.dao.rproduct.RproductDao;
import cn.tsmchina.one.domain.rproduct.Rcatagory;

@Service
public class RcatagoryServiceImpl implements RcatagoryService {

	@Autowired
	private RcatagoryDao rCatagoryDao;
	@Override
	public List<Rcatagory> getRcatagoris(int page) {
		// TODO Auto-generated method stub
		return rCatagoryDao.getRcatagoris(page);
	}

	@Override
	public void updateRcatagory(Rcatagory catagory) {
		// TODO Auto-generated method stub
		rCatagoryDao.updateRcatagory(catagory);
	}

	@Override
	public void deleteRcatagoryById(int id) {
		// TODO Auto-generated method stub
		rCatagoryDao.deleteRcatagoryById(id);
	}

	@Override
	public int total() {
		// TODO Auto-generated method stub
		return rCatagoryDao.total();
	}

	@Override
	public Rcatagory getProduct(int id) {
		// TODO Auto-generated method stub
		return rCatagoryDao.getProduct(id);
	}

	@Override
	public int  addRcatagory(Rcatagory catagory) {
		// TODO Auto-generated method stub
		return rCatagoryDao.addRcatagory(catagory);
	}

	@Override
	public List<Rcatagory> getAllRcatagoris() {
		// TODO Auto-generated method stub
		return rCatagoryDao.getAllRcatagoris();
	}

}
